package studio.raptor.dispatcher.server.entity;

/**
 * Created by liuyong8 on 2017/6/29.
 */
public class SubItem {
    private String name;
    private String value;
    private String action;

    public SubItem(String name, String value, String action) {
        this.name = name;
        this.value = value;
        this.action = action;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getAction() {
        return action;
    }

    public void setAction(String action) {
        this.action = action;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        SubItem subItem = (SubItem) o;

        if (!name.equals(subItem.name)) return false;
        return value.equals(subItem.value);
    }

    @Override
    public int hashCode() {
        int result = name.hashCode();
        result = 31 * result + value.hashCode();
        return result;
    }

    @Override
    public String toString() {
        return "SubItem{" +
                "name='" + name + '\'' +
                ", value='" + value + '\'' +
                ", action='" + action + '\'' +
                '}';
    }
}
